3.3.41 \(\int \frac {(c (d \sec (e+f x))^p)^n}{(a+b \sec (e+f x))^2} \, dx\) [241]

Optimal. Leaf size=322 \[ -\frac {2 a b F_1\left (\frac {1}{2};\frac {1}{2} (-2+n p),2;\frac {3}{2};\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right ) \cos ^2(e+f x)^{\frac {n p}{2}} \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{\left (a^2-b^2\right )^2 f}+\frac {a^2 F_1\left (\frac {1}{2};\frac {1}{2} (-3+n p),2;\frac {3}{2};\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right ) \cos (e+f x) \cos ^2(e+f x)^{\frac {1}{2} (-1+n p)} \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{\left (a^2-b^2\right )^2 f}+\frac {b^2 F_1\left (\frac {1}{2};\frac {1}{2} (-1+n p),2;\frac {3}{2};\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right ) \cos (e+f x) \cos ^2(e+f x)^{\frac {1}{2} (-1+n p)} \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{\left (a^2-b^2\right )^2 f} \]

[Out]

-2*a*b*AppellF1(1/2,1/2*n*p-1,2,3/2,sin(f*x+e)^2,a^2*sin(f*x+e)^2/(a^2-b^2))*(cos(f*x+e)^2)^(1/2*n*p)*(c*(d*se
c(f*x+e))^p)^n*sin(f*x+e)/(a^2-b^2)^2/f+a^2*AppellF1(1/2,1/2*n*p-3/2,2,3/2,sin(f*x+e)^2,a^2*sin(f*x+e)^2/(a^2-
b^2))*cos(f*x+e)*(cos(f*x+e)^2)^(1/2*n*p-1/2)*(c*(d*sec(f*x+e))^p)^n*sin(f*x+e)/(a^2-b^2)^2/f+b^2*AppellF1(1/2
,1/2*n*p-1/2,2,3/2,sin(f*x+e)^2,a^2*sin(f*x+e)^2/(a^2-b^2))*cos(f*x+e)*(cos(f*x+e)^2)^(1/2*n*p-1/2)*(c*(d*sec(
f*x+e))^p)^n*sin(f*x+e)/(a^2-b^2)^2/f

________________________________________________________________________________________

Rubi [A]
time = 0.38, antiderivative size = 322, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 5, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {4033, 3954, 2903, 3268, 440} \begin {gather*} -\frac {2 a b \sin (e+f x) \cos ^2(e+f x)^{\frac {n p}{2}} \left (c (d \sec (e+f x))^p\right )^n F_1\left (\frac {1}{2};\frac {1}{2} (n p-2),2;\frac {3}{2};\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right )}{f \left (a^2-b^2\right )^2}+\frac {a^2 \sin (e+f x) \cos (e+f x) \cos ^2(e+f x)^{\frac {1}{2} (n p-1)} \left (c (d \sec (e+f x))^p\right )^n F_1\left (\frac {1}{2};\frac {1}{2} (n p-3),2;\frac {3}{2};\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right )}{f \left (a^2-b^2\right )^2}+\frac {b^2 \sin (e+f x) \cos (e+f x) \cos ^2(e+f x)^{\frac {1}{2} (n p-1)} \left (c (d \sec (e+f x))^p\right )^n F_1\left (\frac {1}{2};\frac {1}{2} (n p-1),2;\frac {3}{2};\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right )}{f \left (a^2-b^2\right )^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c*(d*Sec[e + f*x])^p)^n/(a + b*Sec[e + f*x])^2,x]

[Out]

(-2*a*b*AppellF1[1/2, (-2 + n*p)/2, 2, 3/2, Sin[e + f*x]^2, (a^2*Sin[e + f*x]^2)/(a^2 - b^2)]*(Cos[e + f*x]^2)
^((n*p)/2)*(c*(d*Sec[e + f*x])^p)^n*Sin[e + f*x])/((a^2 - b^2)^2*f) + (a^2*AppellF1[1/2, (-3 + n*p)/2, 2, 3/2,
 Sin[e + f*x]^2, (a^2*Sin[e + f*x]^2)/(a^2 - b^2)]*Cos[e + f*x]*(Cos[e + f*x]^2)^((-1 + n*p)/2)*(c*(d*Sec[e +
f*x])^p)^n*Sin[e + f*x])/((a^2 - b^2)^2*f) + (b^2*AppellF1[1/2, (-1 + n*p)/2, 2, 3/2, Sin[e + f*x]^2, (a^2*Sin
[e + f*x]^2)/(a^2 - b^2)]*Cos[e + f*x]*(Cos[e + f*x]^2)^((-1 + n*p)/2)*(c*(d*Sec[e + f*x])^p)^n*Sin[e + f*x])/
((a^2 - b^2)^2*f)

Rule 440

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[a^p*c^q*x*AppellF1[1/n, -p,
 -q, 1 + 1/n, (-b)*(x^n/a), (-d)*(x^n/c)], x] /; FreeQ[{a, b, c, d, n, p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[n
, -1] && (IntegerQ[p] || GtQ[a, 0]) && (IntegerQ[q] || GtQ[c, 0])

Rule 2903

Int[((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Int[Expan
dTrig[(d*sin[e + f*x])^n*(1/((a - b*sin[e + f*x])^m/(a^2 - b^2*sin[e + f*x]^2)^m)), x], x] /; FreeQ[{a, b, d,
e, f, n}, x] && NeQ[a^2 - b^2, 0] && ILtQ[m, -1]

Rule 3268

Int[((d_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff
 = FreeFactors[Cos[e + f*x], x]}, Dist[(-ff)*d^(2*IntPart[(m - 1)/2] + 1)*((d*Sin[e + f*x])^(2*FracPart[(m - 1
)/2])/(f*(Sin[e + f*x]^2)^FracPart[(m - 1)/2])), Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b - b*ff^2*x^2)^p,
x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, d, e, f, m, p}, x] &&  !IntegerQ[m]

Rule 3954

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Dist[Sin[
e + f*x]^n*(d*Csc[e + f*x])^n, Int[(b + a*Sin[e + f*x])^m/Sin[e + f*x]^(m + n), x], x] /; FreeQ[{a, b, d, e, f
, n}, x] && NeQ[a^2 - b^2, 0] && IntegerQ[m]

Rule 4033

Int[((c_.)*((d_.)*sec[(e_.) + (f_.)*(x_)])^(p_))^(n_)*((a_.) + (b_.)*sec[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol]
 :> Dist[c^IntPart[n]*((c*(d*Sec[e + f*x])^p)^FracPart[n]/(d*Sec[e + f*x])^(p*FracPart[n])), Int[(a + b*Sec[e
+ f*x])^m*(d*Sec[e + f*x])^(n*p), x], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] &&  !IntegerQ[n]

Rubi steps

\begin {align*} \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{(a+b \sec (e+f x))^2} \, dx &=\left ((d \sec (e+f x))^{-n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int \frac {(d \sec (e+f x))^{n p}}{(a+b \sec (e+f x))^2} \, dx\\ &=\left (\cos ^{n p}(e+f x) \left (c (d \sec (e+f x))^p\right )^n\right ) \int \frac {\cos ^{2-n p}(e+f x)}{(b+a \cos (e+f x))^2} \, dx\\ &=\left (\cos ^{n p}(e+f x) \left (c (d \sec (e+f x))^p\right )^n\right ) \int \left (\frac {b^2 \cos ^{2-n p}(e+f x)}{\left (b^2-a^2 \cos ^2(e+f x)\right )^2}-\frac {2 a b \cos ^{3-n p}(e+f x)}{\left (b^2-a^2 \cos ^2(e+f x)\right )^2}+\frac {a^2 \cos ^{4-n p}(e+f x)}{\left (-b^2+a^2 \cos ^2(e+f x)\right )^2}\right ) \, dx\\ &=\left (a^2 \cos ^{n p}(e+f x) \left (c (d \sec (e+f x))^p\right )^n\right ) \int \frac {\cos ^{4-n p}(e+f x)}{\left (-b^2+a^2 \cos ^2(e+f x)\right )^2} \, dx-\left (2 a b \cos ^{n p}(e+f x) \left (c (d \sec (e+f x))^p\right )^n\right ) \int \frac {\cos ^{3-n p}(e+f x)}{\left (b^2-a^2 \cos ^2(e+f x)\right )^2} \, dx+\left (b^2 \cos ^{n p}(e+f x) \left (c (d \sec (e+f x))^p\right )^n\right ) \int \frac {\cos ^{2-n p}(e+f x)}{\left (b^2-a^2 \cos ^2(e+f x)\right )^2} \, dx\\ &=-\frac {\left (2 a b \cos ^2(e+f x)^{\frac {n p}{2}} \left (c (d \sec (e+f x))^p\right )^n\right ) \text {Subst}\left (\int \frac {\left (1-x^2\right )^{\frac {1}{2} (2-n p)}}{\left (-a^2+b^2+a^2 x^2\right )^2} \, dx,x,\sin (e+f x)\right )}{f}+\frac {\left (a^2 \cos ^{n p+2 \left (\frac {1}{2}-\frac {n p}{2}\right )}(e+f x) \cos ^2(e+f x)^{-\frac {1}{2}+\frac {n p}{2}} \left (c (d \sec (e+f x))^p\right )^n\right ) \text {Subst}\left (\int \frac {\left (1-x^2\right )^{\frac {1}{2} (3-n p)}}{\left (a^2-b^2-a^2 x^2\right )^2} \, dx,x,\sin (e+f x)\right )}{f}+\frac {\left (b^2 \cos ^{n p+2 \left (\frac {1}{2}-\frac {n p}{2}\right )}(e+f x) \cos ^2(e+f x)^{-\frac {1}{2}+\frac {n p}{2}} \left (c (d \sec (e+f x))^p\right )^n\right ) \text {Subst}\left (\int \frac {\left (1-x^2\right )^{\frac {1}{2} (1-n p)}}{\left (-a^2+b^2+a^2 x^2\right )^2} \, dx,x,\sin (e+f x)\right )}{f}\\ &=-\frac {2 a b F_1\left (\frac {1}{2};\frac {1}{2} (-2+n p),2;\frac {3}{2};\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right ) \cos ^2(e+f x)^{\frac {n p}{2}} \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{\left (a^2-b^2\right )^2 f}+\frac {a^2 F_1\left (\frac {1}{2};\frac {1}{2} (-3+n p),2;\frac {3}{2};\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right ) \cos (e+f x) \cos ^2(e+f x)^{\frac {1}{2} (-1+n p)} \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{\left (a^2-b^2\right )^2 f}+\frac {b^2 F_1\left (\frac {1}{2};\frac {1}{2} (-1+n p),2;\frac {3}{2};\sin ^2(e+f x),\frac {a^2 \sin ^2(e+f x)}{a^2-b^2}\right ) \cos (e+f x) \cos ^2(e+f x)^{\frac {1}{2} (-1+n p)} \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{\left (a^2-b^2\right )^2 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(14108\) vs. \(2(322)=644\).
time = 44.06, size = 14108, normalized size = 43.81 \begin {gather*} \text {Result too large to show} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

Integrate[(c*(d*Sec[e + f*x])^p)^n/(a + b*Sec[e + f*x])^2,x]

[Out]

Result too large to show

________________________________________________________________________________________

Maple [F]
time = 0.12, size = 0, normalized size = 0.00 \[\int \frac {\left (c \left (d \sec \left (f x +e \right )\right )^{p}\right )^{n}}{\left (a +b \sec \left (f x +e \right )\right )^{2}}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c*(d*sec(f*x+e))^p)^n/(a+b*sec(f*x+e))^2,x)

[Out]

int((c*(d*sec(f*x+e))^p)^n/(a+b*sec(f*x+e))^2,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*(d*sec(f*x+e))^p)^n/(a+b*sec(f*x+e))^2,x, algorithm="maxima")

[Out]

integrate(((d*sec(f*x + e))^p*c)^n/(b*sec(f*x + e) + a)^2, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*(d*sec(f*x+e))^p)^n/(a+b*sec(f*x+e))^2,x, algorithm="fricas")

[Out]

integral(((d*sec(f*x + e))^p*c)^n/(b^2*sec(f*x + e)^2 + 2*a*b*sec(f*x + e) + a^2), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (c \left (d \sec {\left (e + f x \right )}\right )^{p}\right )^{n}}{\left (a + b \sec {\left (e + f x \right )}\right )^{2}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*(d*sec(f*x+e))**p)**n/(a+b*sec(f*x+e))**2,x)

[Out]

Integral((c*(d*sec(e + f*x))**p)**n/(a + b*sec(e + f*x))**2, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*(d*sec(f*x+e))^p)^n/(a+b*sec(f*x+e))^2,x, algorithm="giac")

[Out]

integrate(((d*sec(f*x + e))^p*c)^n/(b*sec(f*x + e) + a)^2, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (c\,{\left (\frac {d}{\cos \left (e+f\,x\right )}\right )}^p\right )}^n}{{\left (a+\frac {b}{\cos \left (e+f\,x\right )}\right )}^2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c*(d/cos(e + f*x))^p)^n/(a + b/cos(e + f*x))^2,x)

[Out]

int((c*(d/cos(e + f*x))^p)^n/(a + b/cos(e + f*x))^2, x)

________________________________________________________________________________________